package com.example.jenkinsdemo.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @author 赵恒
 * @date 2023/4/3
 */
@RestController
@RequestMapping("/jenkins")
public class HelloController {
    @GetMapping("/hello")
    public Map<String, String> test() {
        Map<String, String> map = new HashMap<>();
        map.put("code", "200");
        map.put("message", "success");
        return map;
    }

    @GetMapping("/hello2")
    public Map<String, String> test2() {
        Map<String, String> map = new HashMap<>();
        map.put("code", "500");
        map.put("message", "failed");
        return map;
    }
}
